package com.slipper.system.affix.front;

import java.util.List;

import com.slipper.common.bo.Result;
import com.slipper.common.util.ResultUtil;
import com.slipper.system.affix.service.AffixItemService;
import com.slipper.system.api.affix.bo.AffixItemBO;
import com.slipper.system.api.affix.service.IAffixItemSv;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AffixItemSv implements IAffixItemSv {
    @Resource
    private AffixItemService affixItemService;

    @Override
    public Result<AffixItemBO> queryBy(String id) {
        return ResultUtil.successResult(affixItemService.queryBy(id));
    }

    @Override
    public Result<AffixItemBO> save(AffixItemBO bo) {
        return ResultUtil.successResult(this.affixItemService.save(bo));
    }

    @Override
    public Result<?> delete(String id) {
        return ResultUtil.deleteResult(affixItemService.delete(id));
    }

    @Override
    public Result<AffixItemBO> queryByAffixId(String affixId) {
        return ResultUtil.successResult(affixItemService.queryByAffixId(affixId));
    }

    @Override
    public Result<?> deleteAll(String[] ids) {
        return ResultUtil.deleteResult(affixItemService.deleteAll(ids));
    }

    @Override
    public Result<List<AffixItemBO>> queryList(AffixItemBO bo) {
        return ResultUtil.successResult(this.affixItemService.queryList(bo));
    }
}
